<template>
  <ul class="list">
    <li v-for="item in reyinglist" :key="item.id">
      <!-- 添加跳转到 内容页的链接 -->
      <router-link :to="'/item/' + item.id">
        <div class="left"><img :src="item.img" /></div>

        <div class="mid">
          <div class="nm">{{ item.nm }}</div>
          <div class="sc">观众评分：
           <p> {{ item.sc }} </p>
          </div>
          <div>主演：{{ item.star }}</div>
          <div>   {{item.showInfo}} </div>
        </div>

        <div class="right">购票</div>
      </router-link>
    </li>
  </ul>
</template>

<script>
export default {
  name: "reying",
  props: ["reyinglist"], //获取从父组件传过来的参数
};
</script>

<style scoped>
.list li {
  display: flex;
  width: 100%;
  height: 114px;
  
  margin-bottom: 10px;
}
.left {
  margin-left: 20px;
}
.list li a {
  width: 100%;
  height: 114px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #666;
  border-bottom: 1px solid rgb(204, 195, 195);
}
.list li a .mid{
  width: 100%;
  margin-left: 5px;
}
.list li a .right{
  width: 47px;
    height: 27px;
    line-height: 28px;
    text-align: center;
    box-sizing: border-box;
    background-color: #f03d37;
    color: #fff;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 12px;
    cursor: pointer;
    margin-right: 10px;
}
.mid .nm{
  font-size: 17px;
    color: #333;
    font-weight: 700;
    
    flex-shrink: 1;
}
.mid .sc{
  display: flex;
}
.mid .sc p{
  font-weight: 700;
    color: #faaf00;
    font-size: 15px;
}
</style>